from fastapi import APIRouter, status

from .service import Open_street_map_service

osm_router = APIRouter(tags=["open_street_map"])


@osm_router.get(
    "/pixels",
    status_code=status.HTTP_200_OK
)
async def get_map(
    latitude: float,
    longitude: float,
    zoom: int = 8
):
    return await Open_street_map_service().get_pixels_coords(
        latitude,
        longitude,
        zoom
    )
